package com.itop.demo.common.constant

/**
 * Title:TODO
 * Description:TODO
 * Copyright:Copyright (c) 2018
 * Company: 各环境对应
 * Author:jin.li.o
 * Date:2018/9/21
 * Version 1.0
 */

class BaseEnv() {
    val ENV_MOCK: String = ""
    val ENV_DEV: String = ""

    /**
     * 根据env获取host
     */
    fun getHostByEnv(env: String): EnvEnum {
        when (env) {
            ENV_MOCK -> return EnvEnum.mock
            ENV_DEV -> return EnvEnum.dev
            else -> {
                return EnvEnum.dev
            }
        }
    }

    enum class EnvEnum {
        mock {
            fun getBaseHost(): String {
                return "https://toolkitapi-test.niohome.com/"
            }
        },

        dev {
            fun getBaseHost(): String {
                return "https://toolkitapi-test.niohome.com/"
            }
        }
    }
}